package evolution_superclasses;

import java.util.Random;

import misc.not_Legal_Exception;

public abstract class Genotype {
	
	private int _genSize;
	private Phenotype _phenotype;
	protected Random _rand;

	public Genotype(int size){
		_rand = new Random();
		set_genSize(size);
		try {
			createGenotype(size);
		} catch (not_Legal_Exception e) {
			e.printStackTrace();
		}
	}
	
	public int get_genSize() {
		return _genSize;
	}

	public void set_genSize(int genSize) {
		_genSize = genSize;
	}

	public Phenotype get_phenotype() {
		return _phenotype;
	}

	public void set_phenotype(Phenotype phenotype) {
		_phenotype = phenotype;
	}

	public abstract Phenotype generatePhenotype();
	public abstract void createGenotype(int size) throws not_Legal_Exception ;
	public abstract String toString();
	
}
